<template>
  <view>
    <web-view v-if="showPage" :src="url"></web-view>
    <u-empty v-else mode="page"></u-empty>
  </view>
</template>

<script>
export default {
  data() {
    return {
      url: '', // 报错 : The data property "url" is already declared as a prop. Use prop default value instead.
      showPage: true
    }
  },
  onLoad(options) {
    try {
      this.$nextTick(() => {
        // url 传输过程中被转义了,所以给改回去
        this.url = decodeURIComponent(options.url)
      })
    } catch (err) {
      console.error('web-view 页面出错')
      console.error(err)
      this.showPage = false
    }
  },

  methods: {

  }
}
</script>

<style>

</style>
